﻿<?php
require("include/includes.php");
if(isset($_SESSION['user']))
{
	/*if(!verifyCsrfToken())
	{
		$errors['csrf'] = 'Security token missing!';
	}
	else // CSRF ok */
	{
		unset($_SESSION['user']);
		if(isset($_SERVER['HTTP_REFERER']))
		{
			header('Location: '.$_SERVER['HTTP_REFERER']); 
		}
		else
		{
			header('Location: index.php');
		}
	}
}else{
	header('Location: index.php');
}
?>